﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Microsoft.Reporting.WebForms;
using STT.Business;
using STT.Entities;
using STT.Layer.Connection;
using System.Data;
namespace STT.Report
{
    public partial class ViewHocVien : System.Web.UI.Page
    {
        public string nguoitao;
        protected void Page_Load(object sender, EventArgs e)
        {
           
        }
        protected void rbtLop_CheckedChanged(object sender, EventArgs e)
        {
            if (rbtLop.Checked == true)
            {
                rbtPhong.Checked = false;
            }
            ddlop.Visible = true;
            ddlPhongBan.Visible = false;

        }

        protected void rbtPhong_CheckedChanged(object sender, EventArgs e)
        {
            if (rbtPhong.Checked == true)
            {
                rbtLop.Checked = false;
            }
            ddlPhongBan.Visible = true;
            ddlop.Visible = false;
        }

        

        protected void lbIn_Click(object sender, EventArgs e)
        {
            nguoitao = Session["TenDN"].ToString();
            DataTable dt = BTbHocVien.SelectAll_Xuat(int.Parse(ddlop.SelectedValue),nguoitao);
            rpvHocVien.Visible = true;
            rpvHocVien.LocalReport.ReportPath = "RDLC\\HocVien.rdlc";
            rpvHocVien.LocalReport.DataSources.Clear();
            rpvHocVien.LocalReport.DataSources.Add(new ReportDataSource("DataSet1",dt));



        }

        protected void ddlop_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        protected void ddlop_TextChanged(object sender, EventArgs e)
        {

        }

        protected void ddlop_Unload(object sender, EventArgs e)
        {

        }

        
    }
}